package com.linesum.code.service.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service;

import com.linesum.code.config.property.DatasourceProperty;
import com.linesum.code.service.MessageService;

/**
 *
 * @author chenzf
 * @date 2016年6月23日下午6:20:32
 */
@Service
@EnableConfigurationProperties(DatasourceProperty.class) //注册并实例化
public class MessageServiceImpl implements MessageService {
	@Resource
	private DatasourceProperty datasourceProperty;
	@Value("${xuw.name}")
	private String name;

	@Override
	public String getName() {
		return this.name;
	}

	@Override
	public String getUsername() {
		return datasourceProperty.getUsername();
	}
}
